
<table class="layui-hide" id="currentTableId3" lay-filter="currentTableFilter3"></table>

<script type="text/html" id="typeTableBar3">
	{{d.type == 1?'报销':''}}
	{{d.type == 2?'预支':''}}
</script>
<script type="text/html" id="statusTableBar3">
	{{d.status == 0?'驳回':''}}
	{{d.status == 1?'审核中':''}}
	{{d.status == 2?'放款中':''}}
	{{d.status == 3?'完成':''}}
</script>
<script>

	var $,form,table,laydate
	layui.use(['form', 'table', 'tableSelect', 'laydate'], function () {
		var $ = layui.jquery , form = layui.form , table = layui.table , laydate = layui.laydate

		table.render({
			elem: '#currentTableId3',
			id:'list_sp_accomplish',
			url: '{:url("list_sp_accomplish")}?t=json',
			method : 'post',
			toolbar: true,
			cols: [[
				{ field: 'create_time', title: '提交日期'},
				{ field: 'type', title: '类型',toolbar: '#typeTableBar'},
				{ field: 'title', title: '提交类别' },
				{ field: 'money', title: '金额'},
				{ field: 'remark', title: '费用明细' },
				{ field: 'screenshot_url', title: '申请凭证',  templet: function(d){
			          return '<img  src="'+d.screenshot_url+'">'
			    }},
			    { field: 'remark', title: '收款账号',  templet: function(d){
			          return d.bank_name+' '+d.number
			    } },
			    { field: 'accomplish_url', title: '打款凭证',templet: function(d){
			          return '<img  src="'+d.accomplish_url+'">'
			    } },
			    { field: 'status', title: '状态',toolbar: '#statusTableBar3' },
			    { field: 'user_name', title: '申请人' },
			]],
			limit: 30,
			page: true,
			skin: 'line'
		});

		
		//监听行单击事件
		table.on('row(currentTableFilter3)', function(obj){
			  layer.photos({
				  photos: obj.tr
				  ,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
				});
			});
		
	});
	
</script>
